﻿Imports ajayumi.develop.win32.GameEditor.Base

Public Class ucController


    Private m_Game As IGame = Nothing
    Public WriteOnly Property Game() As IGame
        Set(ByVal value As IGame)
            m_Game = value
        End Set
    End Property


    Private Sub ucController_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.btnNectar.Text = String.Format("修改花蜜为{0}", My.Settings.Nectar)
        Me.btnEssence.Text = String.Format("修改香精为{0}", My.Settings.Essence)
        Me.btnUnlimited.Text = "无限模式"
    End Sub

    Private Sub btnNectar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNectar.Click
        Try
            DirectCast(Me.m_Game, Bugbits).ChangeNectar(200)
            'DirectCast(Me.m_Game, Bugbits).ChangeNectar(My.Settings.Nectar)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

    Private Sub btnEssence_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEssence.Click
        Try
            DirectCast(Me.m_Game, Bugbits).ChangeEssence(My.Settings.Essence)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

    Private Sub btnUnlimited_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUnlimited.Click
        Try
            DirectCast(Me.m_Game, Bugbits).UnlimitedMode()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
End Class
